package com.lifeng.mydubbo.service;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.stereotype.Service;

import com.lifeng.mydubbo.api.UserService;
import com.lifeng.mydubbo.api.pojo.User;
@Service
public class UserServiceImpl implements UserService{

	public String getUserInfo(String username) {
		return "hello:"+ username;
	}

	public List<User> showAllUser() {
		List<User> list = new ArrayList<User>();
		User user1 = new User();
		user1.setId("11");
		user1.setUserName("張三");
		user1.setBirthday(new Date());
		User user2 = new User();
		user2.setId("12");
		user2.setUserName("張三3");
		user2.setBirthday(new Date());
		User user3 = new User();
		user3.setId("13");
		user3.setUserName("張三1");
		user3.setBirthday(new Date());
		list.add(user1);
		list.add(user2);
		list.add(user3);
		return list;
	}

	public User getUser() {
		User user3 = new User();
		user3.setId("13");
		user3.setUserName("張三1");
		user3.setBirthday(new Date());
		return user3;
	}

}
